<% content_for :thredded_page_title, t('thredded.nav.edit_private_topic') %>
<% content_for :thredded_page_id, 'thredded--edit-private-topic' %>
<% content_for :thredded_breadcrumbs do %>
  <ul class="thredded--navigation-breadcrumbs">
    <li><%= link_to t('thredded.nav.all_messageboards'), messageboards_path %></li>
    <li><%= link_to t('thredded.nav.private_topics'), private_topics_path %></li>
    <li><%= link_to @private_topic.title_was || @private_topic.title, topic_path(@private_topic) %></li>
    <li><%= link_to t('thredded.nav.edit_private_topic'), edit_private_topic_path(@private_topic) %></li>
  </ul>
<% end %>


<%= thredded_page do %>
  <section class="thredded--main-section">
    <%= form_for @private_topic,
                 url: private_topic_path(@private_topic),
                 html: { class: 'thredded--form', 'data-thredded-topic-form' => true } do |form| %>
      <ul class="thredded--form-list on-top">
        <li class="title">
          <%= form.label :title, t('thredded.private_topics.form.title_label') %>
          <%= form.text_field :title,
                              placeholder: t('thredded.private_topics.form.title_placeholder_new'),
                              autofocus: true,
                              required: true %>
          <%= render 'thredded/shared/field_errors', messages: form.object.errors[:title] %>
        </li>
        <li>
          <button type="submit" class="thredded--form--submit"
                  data-disable-with="<%= t 'thredded.private_topics.form.update_btn_submitting' %>">
            <%= t('thredded.private_topics.form.update_btn') %>
          </button>
        </li>
      </ul>
    <% end %>
  </section>
<% end %>
